Skip to content

fix "make format-pins" for windows#28094

Merged
thinkyhead merged 6 commits intoMarlinFirmware:bugfix-2.1.xfrom
ellensp:make-format-pins-for-windows-also
Oct 7, 2025
Merged

fix "make format-pins" for windows#28094
thinkyhead merged 6 commits intoMarlinFirmware:bugfix-2.1.xfrom
ellensp:make-format-pins-for-windows-also

Conversation

@ellensp
Copy link
Contributor

@ellensp ellensp commented Oct 4, 2025

Description

While helping out with #28089 it was noticed that github CI test advised to run make format-pins to clean up the pins file.
But this does not work under windows.

Updated Makefile so format pins works on linux and windows.

pinsformat.py also had to be updated slightly to stop windows converting everything to CRLF

Requirements

Windows and a desire to run make format-pins

Benefits

make format-pins now works on windows

Related Issues

  • Add: Mightyboard rev G and H (Makerbot replicator 2 and 2X and clones)  #28089
  • @thinkyhead thinkyhead force-pushed the make-format-pins-for-windows-also branch from 1858ed1 to 768fd8c Compare October 7, 2025 00:50
    @thinkyhead thinkyhead force-pushed the make-format-pins-for-windows-also branch from c146d6e to 5373a25 Compare October 7, 2025 01:54
    @thinkyhead thinkyhead merged commit ef3e913 into MarlinFirmware:bugfix-2.1.x Oct 7, 2025
    67 checks passed
    @ellensp ellensp deleted the make-format-pins-for-windows-also branch October 7, 2025 08:29
    @chepo92
    Copy link
    Contributor

    chepo92 commented Nov 26, 2025

    @ellensp regarding format-pins there is a problem with the makefile in windows anyway, as line 29 has double quotes that the SO doesn't like and will not run as it is PINS_RAW := $(shell cmd //c "dir /s /b Marlin\src\pins\*.h 2>nul | findstr /r ".*Marlin\\\\src\\\\pins\\\\.*\\\\pins_.*\.h"") I think solving it will just open another issue in other line

    @ellensp
    Copy link
    Contributor Author

    ellensp commented Nov 26, 2025

    line 29 $(error No Python executable found – install Python 3.x and make sure it is in your PATH)
    It has no quotes what so ever.

    @chepo92
    Copy link
    Contributor

    chepo92 commented Nov 26, 2025

    Sorry, just to clarify, ignore the line/quotes I said, the output of the command is:

    PS D:\Git\Marlin> make format-pins       
    El sistema no puede encontrar la ruta especificada.
    Makefile:29: *** recipe commences before first target.  Stop.
    

    @ellensp
    Copy link
    Contributor Author

    ellensp commented Nov 26, 2025

    Although I agree its poorly formatted. It works on my test windows 11 machine without errors...

    After fighting with windows for several hours I've given up on using windows cmd line tools and used python to bypass all of the window weirdness with finding the required files

    Since I cannot replicate your make error, please test https://github.com/ellensp/Marlin/tree/update-makefile
    You can see the files changed here bugfix-2.1.x...ellensp:Marlin:update-makefile

    If it also works for you, ill make the pr non draft.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    3 participants